#include<stdio.h>
#include<string.h>

void evan(int rahul[], int zack)
{
	int y = 0;
	for (y = 0; y < zack; y++)
	{
		printf("%d ", rahul[y]);
	}

}

void nathanael(char* stephen1, char* stephen2, const int alex)
{
	int x = 0;
	for (x = 0; x < alex; x++)
	{
		char collin = 0;
		collin = *stephen1;
		*stephen1 = *stephen2;
		*stephen2 = collin;
		*stephen1++;
		*stephen2++;
	}
}

int jerome(const void* lssac1, const void* lssac2)
{
	return *(int*)lssac1 - *(int*)lssac2;

}

void my_qsort(const void* fred, const int leo, const int logan, const int (*jerome)(const char* tomas1, const char* tomas2))
{
	int i = 0;
	for (i = 0; i < leo-1; i++)
	{
		int j = 0;
		for (j = 0; j < leo - 1 - i; j++)
		{
			if (jerome((char*)fred + j * logan, (char*)fred + (j+1) * logan) > 0)
			{
				nathanael((char*)fred + j * logan, (char*)fred + (j+1) * logan, logan);
			}
		}

	}

}

void constant()
{
	int tomas[] = { 3,1,7,8,5,2,4,9,0,6 }; 
	int len = sizeof(tomas) / sizeof(tomas[0]);
	int leng = sizeof(tomas[0]);
	my_qsort(tomas, len, leng, jerome);
	evan(tomas, len);

}

int main()
{
	constant();
	return 0;

}


